﻿Imports System.IO
Imports System.Web.UI
Imports System.Web

Namespace AboutDNN.DNNMVC

#Region "IServer"
    Public Interface IServer
        Function MapPath(ByVal virtualPath As String) As String
        Sub Execute(ByVal currentPage As Page, ByVal output As StringWriter, ByVal keepFormData As Boolean)
    End Interface
#End Region

#Region "ASPServer"

    Public Class ASPServer
        Implements IServer

        Private _server As HttpServerUtility = HttpContext.Current.Server

        Public Sub Execute(ByVal currentPage As System.Web.UI.Page, ByVal output As System.IO.StringWriter, ByVal keepFormData As Boolean) Implements IServer.Execute
            _server.Execute(currentPage, output, keepFormData)
        End Sub

        Public Function MapPath(ByVal virtualPath As String) As String Implements IServer.MapPath
            Return _server.MapPath(virtualPath)
        End Function
    End Class

#End Region


End Namespace
